<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>婚礼邀请函</title>
  <style>
   
 
  </style>
</head>
<body >
  <div style="padding: 0px; margin: 0px;"><img src="image/img1.jpg" style="width: 100%; display: block;"></div>

  <div style="padding: 0px; margin: 0px;"><img id = "img" src="image/1.jpg" style="width: 100%; display: block;"></div>

  <div style="padding: 0px; margin: 0px;"><img id = "img3" src="image/img3.jpg" style="width: 100%; display: block;"></div>

  <script>
    const img = document.getElementById('img');
    const img3 = document.getElementById('img3');
    img3.addEventListener('click',
        function() {
           location.href = 'https://surl.amap.com/2N26TrSM21K';
        });
    let currentIndex = 1;

        function showNextItem() {
          img.src = 'image/'+currentIndex+'.jpg';
          currentIndex ++;
          if(currentIndex> 6){
            currentIndex = 1;
           
        }
  }
     setInterval(showNextItem, 5000); // Change image every 5 seconds
       
  </script>
</body>
</html>
